package cn.credit.ms.dbms;

public class ThreadKeys  {
	private static final String activeDS = "spi.datasource.current";
	
	//skey>rkey>qkey>pkey  okey tkey
	public static final String ownerKey = "req.okey"; // owner object opera open others  ID
	//public static final String primeKey = "req.pkey"; // probe print prize prime prior privy post parent ID
	//public static final String questKey = "req.qkey"; // query quest quota ID
	public static final String referKey = "req.rkey"; // refer random request response root ID
	public static final String shareKey = "req.skey"; // share sequence serial service session ID
	public static final String tokenKey = "req.tkey"; // trace tickets token task term ID
	
	// process invoke probe enclose(PIPE); service process invoke(SPI)
	public static final String TACK = "pipe.tack"; // fixed root
	public static final String TICK = "pipe.tick"; // inherit id
	public static final String TOCK = "pipe.tock"; // current id
	
	//organize,company unit 
	public static final String UNIT_UNID="unit.unid"; 
	public static final String UNIT_CODE="unit.code";
	public static final String UNIT_NAME="unit.name"; 
	public static final String UNIT_ACCT="unit.acct";

	//operated user, data user
	public static final String CUST_UNID="cust.unid";
	public static final String CUST_CODE="cust.code";
	public static final String CUST_NAME="cust.name";
	public static final String CUST_ACCT="cust.acct";

	// operation, login user 
	public static final String USER_UNID="user.unid";
	public static final String USER_CODE="user.code";
	public static final String USER_NAME="user.name";
	public static final String USER_ACCT="user.acct";
	public static final String USER_AUTH="user.auth";


	@Deprecated	public static final String serveKey = "req.skey"; // share sequence serial service session ID
	
    public static String getDS(){
    	return ThreadHold.get(activeDS);
    }
    
    public static void setDS(String key){
    	ThreadHold.set(activeDS,key);
    }    

	
}
